"""mstor_server URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/4.1/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import re_path

from . import views_common, views_admin, views_wx_user, views_wx_api

urlpatterns = [
    # http://127.0.0.1:8000/api/store_admin/admin_site
    re_path(r"^admin_site/", admin.site.urls),
    # /api/admin/login
    re_path(r"^admin/login(/)?$", views_admin.AdminLoginView.as_view()),
    re_path(r"^admin/wx_user(/)?$", views_admin.AdminWxUserView.as_view()),
    re_path(
        r"^admin/recharge_promotion(/)?$", views_admin.RechargePromotionView.as_view()
    ),
    re_path(r"^admin/store_good_type(/)?$", views_common.StoreGoodTypeView.as_view()),
    re_path(r"^admin/store_good(/)?$", views_admin.OwnerStoreGoodView.as_view()),
    re_path(r"^admin/user_recharge(/)?$", views_admin.UserRechargeView.as_view()),
    # /api/wx_user/
    re_path(r"^wx_user(/)?$", views_wx_user.WxUserView.as_view()),
    re_path(
        r"^wx_user/recharge_promotion(/)?$",
        views_wx_user.WxUserRechargePromotionView.as_view(),
    ),
    re_path(
        r"^wx_user/remain_money(/)?$", views_wx_user.WxUserRemainMoneyView.as_view()
    ),
    re_path(
        r"^wx_user/pay_callback(/)?$", views_wx_user.WxUserPayCallBackView.as_view()
    ),
    # user good util
    re_path(r"^wx_user/store_good_type(/)?$", views_common.StoreGoodTypeView.as_view()),
    re_path(r"^wx_user/store_good(/)?$", views_wx_user.WxUserStoreGoodView.as_view()),
    re_path(
        r"^wx_user/store_good_car_content(/)?$",
        views_wx_user.WxUserStoreGoodCarContentView.as_view(),
    ),
    re_path(
        r"^wx_user/store_shopping(/)?$",
        views_wx_user.StoreShoppingView.as_view(),
    ),
    # /api/wx/
    # 微信接口
    re_path(r"^wx/tcb_token(/)?$", views_wx_api.TcbTokenView.as_view()),
    re_path(r"^wx/tcb_download(/)?$", views_wx_api.TcbDownloadView.as_view()),
]
